#ifndef RSTAT_AGENT_H
#define RSTAT_AGENT_H

#include "interfaces.h"
#include "protocol.h"
#include <QTimer>

class RstatAgent: public RstatAgentInterface
{
	Q_OBJECT
	
	public:
		RstatAgent(std::string ip = "");
		std::string getServerIP();
		void setServerIP(std::string ip);
	
		void InitAgent();
	private:
		std::string m_ip;
		TRstatData m_rstatData;
		QTimer *m_timer;
		int m_pagein_scale;
		int m_pageout_scale;
		int m_intr_scale;
		int m_context_sw_scale;
		int m_packetin_scale;
		int m_packetout_scale;

	private slots:
		void getRstat();

	public slots:
		void SetServerIP(std::string ip);
};

#endif
